isEdit

I have this problem, I'm opening a dxl from a module (current) but some of the answers from my GUI will be sent to another module (target).
But most of the times the current modules are opened in sharable edit, and this data when sended to the target module, open the same in exclusive, so from time to time, errors appear, like more than one user trying to open the same module (target) in exclusive edit.
I wanted to use the function isEdit so the DOORS could know that the target module is already in exclusive edit and the user have to wait  and try the operation later. 
The thing is I have tried to use the isEdit function, and the message I want appear under the circuntances I want, but DOORS still showing the  Request Lock message, and I don't this message to appear.
How can I do it?

 

void saveButtonFunc(DB calledFrom) {
 
bool saveTargModRequired = false
 
Targetmod = edit(path(the path to the module here), false)
 
if (null Targetmod)   {
warningBox("Module is locked by other user. Please wait a seconds before try again")
halt
}
elseif(!isEdit(Targetmod)) {
warningBox("Module is locked by other user. Please wait a seconds before try again")
close(Targetmod)
halt
}
else{
saveTargModRequired = true
 
//my if's
 
      }
saveData() 
}

 


braolive - Tue Jan 21 13:40:43 EST 2014

Re: isEdit
llandale - Tue Jan 21 14:27:59 EST 2014

You need the expanded "edit()" function;

  • Module edit(string Name, bool Visible, bool Silent, bool LoadStandardView).

When "Silent", if the module is locked then the "edit" function returns null and there is no such prompt dialog.  The following is typical:

  • Module mod = edit(NameFull, false, true, true)
  • if (null mod) then Try again later
  • // elseif(!isEdit(mod)) then Louie is wrong
  • else proceed with edited module.

-Louie

Re: isEdit
braolive - Wed Jan 22 04:12:56 EST 2014

llandale - Tue Jan 21 14:27:59 EST 2014

You need the expanded "edit()" function;

  • Module edit(string Name, bool Visible, bool Silent, bool LoadStandardView).

When "Silent", if the module is locked then the "edit" function returns null and there is no such prompt dialog.  The following is typical:

  • Module mod = edit(NameFull, false, true, true)
  • if (null mod) then Try again later
  • // elseif(!isEdit(mod)) then Louie is wrong
  • else proceed with edited module.

-Louie

Thank you!

It worked no more Request Lock message. =)